package com.grad.why.studentsystem.util;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class JavaUsePython {
    public static void main(String[] args) throws IOException {
        String[] argsArray = new String[] {"python", "D:\\git\\FCHD-Fully-Convolutional-Head-Detector\\head_detection_demo.py"};
        Process pr = Runtime.getRuntime().exec(argsArray);
        BufferedReader in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
        String line;
        boolean flag = true;
        while ((line = in.readLine()) != null) {
            System.out.println(line);
        }
        in.close();
    }
}
